package www.bplead.com.controller.db;

import android.content.ContentResolver;
import android.net.Uri;
import android.provider.BaseColumns;

import java.net.URI;

/**
 * Created by wangyangzi on 2016/10/19.
 */
public class DbConstant {
    static Uri AUTHORITY_URI = new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(DataProvider.authority).build();

    interface Tables{
        String TABLE_STUDENT = "student";
        String TABLE_CLASS = "class";
        String TABLE_COURSE = "course";
    }

    interface Indexs{
        int INDEX_STUDENT = 1000;
        int INDEX_CLASS = 1001;
        int INDEX_COURSE = 1002;
    }

    public interface TableStudent extends BaseColumns{
        public Uri CONTANT_URI = Uri.withAppendedPath(AUTHORITY_URI,Tables.TABLE_STUDENT);
        public String NAME = "name";
        public String NO = "no";
        public String CLASS_ID = "class_id";
        public String COURSE_ID = "course_id";
    }

    public interface TableClass extends BaseColumns{
        public Uri CONTANT_URI = Uri.withAppendedPath(AUTHORITY_URI,Tables.TABLE_CLASS);
        public String NAME = "name";
    }

    public interface TableCourse extends BaseColumns{
        public Uri CONTANT_URI = Uri.withAppendedPath(AUTHORITY_URI,Tables.TABLE_COURSE);
        public String NAME = "name";
    }
}
